package cn.fzkj.springcloud.service;

import cn.fzkj.springcloud.config.FallBackFactory;
import cn.fzkj.springcloud.config.HystrixFallbackService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Component
@FeignClient(value = "CLOUD-PAYMENT-SERVICE",
//        fallback = HystrixFallbackService.class,
        fallbackFactory = FallBackFactory.class)
public interface HystrixService {

    @GetMapping(value = "/payment/get/{id}")
    public String get(@PathVariable("id") Long id);
}
